﻿<%@ Page Language="C#" MasterPageFile="~/admin/MasterPage_Admin.master" AutoEventWireup="true"
    CodeFile="tel.aspx.cs" Inherits="admin_Default" Title="IT110：不良信息举报与检索平台 - 查询信息管理 - By ECountry.Ltd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder_Search" runat="Server">
    <div class="w-sjzzbb">
        <div class="w-sjzztop">
            综合数据管理
        </div>
    </div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div style="border:1px solid #09f;text-align:left"><p style="font-size:17px;text-align:center">手机号段综合管理</p>
            请选择：运营商：<asp:DropDownList ID="DropDownList_company" runat="server" DataSourceID="ObjectDataSource_company"
                DataTextField="short" DataValueField="id" AppendDataBoundItems="True" style="margin-right:15px;">
                <asp:ListItem Selected="True" Value="0">==全部==</asp:ListItem>
            </asp:DropDownList>
            <%--            &nbsp;号段:<asp:DropDownList ID="DropDownList_code" runat="server" 
                AppendDataBoundItems="True">
                <asp:ListItem Selected="True" Value="0">==全部==</asp:ListItem>
            </asp:DropDownList>
            省份:<asp:DropDownList ID="DropDownList_province" runat="server" 
                AppendDataBoundItems="True" AutoPostBack="True">
                <asp:ListItem Selected="True" Value="0">==全部==</asp:ListItem>
            </asp:DropDownList>
            城市:<asp:DropDownList ID="DropDownList_city" runat="server" 
                AppendDataBoundItems="True" AutoPostBack="True">
                <asp:ListItem Selected="True" Value="0">==全部==</asp:ListItem>
            </asp:DropDownList>
            --%>
            号码模糊查询:<asp:TextBox ID="TextBox_search" runat="server" Width="80px" style="border:1px solid #09f;margin-right:15px;" Text="输入关键字.."
                onclick="if(this.value=='输入关键字..')this.value='';" onmouseout="if(this.value=='')this.value='输入关键字..';"></asp:TextBox>
            地区模糊查询:<asp:TextBox ID="TextBox_city" runat="server" Width="80px" style="border:1px solid #09f;margin-right:15px;" Text="输入关键字.."
                onclick="if(this.value=='输入关键字..')this.value='';" onmouseout="if(this.value=='')this.value='输入关键字..';"></asp:TextBox>
            <asp:Button ID="Button_Search" runat="server" Text="查询" OnClick="Button_Search_Click" style="background:#09f;color:white;height:25px;width:40px;padding:0" class="btn"/>
            <asp:ObjectDataSource ID="ObjectDataSource_province" runat="server" OldValuesParameterFormatString="original_{0}"
                SelectMethod="Get_Province_Data_Order_By_Province" TypeName="DataSet_fp_DyhTableAdapters.Dyh_MPcodeTableAdapter">
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="ObjectDataSource_company" runat="server" OldValuesParameterFormatString="original_{0}"
                SelectMethod="Get_Data_Order_By_Id" TypeName="DataSet_fp_DyhTableAdapters.Dyh_MPcode_companyTableAdapter">
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="ObjectDataSource_firstnum" runat="server" OldValuesParameterFormatString="original_{0}"
                SelectMethod="Get_FirstNum_Data_By_Company" TypeName="DataSet_fp_DyhTableAdapters.Dyh_MPcodeTableAdapter">
                <SelectParameters>
                    <asp:ControlParameter ControlID="DropDownList_company" Name="companyid" PropertyName="SelectedValue"
                        Type="Byte" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <br>
            <font color="red">*注：电话数据量很大，默认情况下，只显示最后200条数据，通过选择过滤条件，可以显示更多数据。</font>
            </div>
            <asp:ListView ID="ListView1" runat="server" DataKeyNames="id" DataSourceID="ObjectDataSource_MPnumber"
                InsertItemPosition="LastItem" OnItemInserting="ListView1_ItemInserting">
                <%--<AlternatingItemTemplate>
                      <tr style="background-color: #FFFFFF;color: #284775; width: 100%;">
                            <td colspan="2">
                                ID: <asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>' />
                            </td>
                            <td>
                                号段:<asp:Label ID="numLabel" runat="server" Text='<%# Eval("num") %>' />
                            </td>
                            <td>
                                区号:<asp:Label ID="zoomLabel" runat="server" Text='<%# Eval("zoom") %>' />
                            </td>
                            <td>
                                禁用：<asp:CheckBox ID="Delete_flagCheckBox" runat="server"  Checked='<%# Eval("Delete_flag") %>' Enabled="false" />
                            </td>
                        </tr>
                        <tr style="background-color: #FFFFFF;color: #284775;">
                            <td height="14" colspan="2">
                                城市:<asp:Label ID="cityLabel" runat="server" Text='<%# Eval("city") %>' />
                            </td>
                            <td >
                                制式:<asp:Label ID="cardtypeLabel" runat="server" Text='<%# Eval("cardtype") %>' />
                            </td>
                            <td >
                                品牌:<asp:Label ID="brandLabel" runat="server" Text='<%# Eval("brand") %>' />
                            </td>
                            <td >
                            
                            </td>
                        </tr>
                        <tr style="background-color: #FFFFFF;color: #284775;">
                            <td width="116">
                                运营商：</td>
                            <td colspan="4">
                                <asp:Label ID="companyLabel" runat="server" Text='<%# Eval("company") %>' />
                            	（<asp:Label ID="E_companyLabel" runat="server" Text='<%# Eval("E_company") %>' />）</td>
                        </tr>
                        <tr style="background-color: #FFFFFF;color: #284775;">
                            <td >
                                <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="编辑" />
                                <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="删除" />
                            </td>
                            <td colspan="4">
                                
                                </td>
                        </tr>

                </AlternatingItemTemplate>--%>
                <LayoutTemplate>
                    <table runat="server">
                        <tr runat="server">
                            <td runat="server">
                                <table id="itemPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF;
                                    border-collapse: collapse; border-color: #ffffff; border-style: none; font-family: Verdana, Arial, Helvetica, sans-serif;
                                    width: 100%;">
                                    <tr id="itemPlaceholder" runat="server">
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr runat="server" style="color:#ffffff;height:35px;">
                            <td runat="server" style="text-align: center; background-color: #0099FF; font-family: Verdana, Arial, Helvetica, sans-serif;
                                color: #FFFFFF">
                                <asp:DataPager ID="DataPager1" runat="server" PageSize="20">
                                    <Fields>
                                        <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False"
                                            ShowPreviousPageButton="True" ShowLastPageButton="False" ButtonCssClass="datapager" />
                                        <asp:NumericPagerField ButtonCount="10" CurrentPageLabelCssClass="datapager"/>
                                        <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="True"
                                            ShowPreviousPageButton="False"  ButtonCssClass="datapager"/>
                                    </Fields>
                                </asp:DataPager>
                            </td>
                        </tr>
                    </table>
                </LayoutTemplate>
                <InsertItemTemplate>
                    <tr style="color: #333333; width: 100%;">
                        <td rowspan="3" style="width: 40px; height: 13px; text-align: center;border:0">
                            ID：
                        </td>
                        <td rowspan="3" style="width: 70px; height: 13px; text-align: center;">
                            <%--<asp:TextBox ID="idTextBox" runat="server" Text='<%# Bind("id") %>' />--%>
                        </td>
                        <td style="width: 65px; height: 13px; text-align: right;">
                            号段：
                        </td>
                        <td style="width: 90px; height: 13px;">
                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("num") %>' ForeColor="Maroon"
                                Font-Bold="True" Width="80" style="border:1px solid #09f"/>
                        </td>
                        <td style="width: 65px; height: 13px; text-align: right;">
                            区号：
                        </td>
                        <td style="width: 90px; height: 13px;">
                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("zoom") %>' ForeColor="Maroon"
                                Font-Bold="True" Width="80" style="border:1px solid #09f"/>
                        </td>
                        <td style="width: 65px; height: 13px; text-align: right;">
                            城市：
                        </td>
                        <td style="width: 90px; height: 13px;;">
                            <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("city") %>' Width="80"  style="border:1px solid #09f"/>
                        </td>
                        <td style="width: 65px; height: 13px; text-align: right;">
                            禁用：
                        </td>
                        <td style="width: 90px; height: 13px;">
                            <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("Delete_flag") %>'
                                ToolTip="选中为“使用”，不选中为“禁用”。" />
                        </td>
                        <td rowspan="3">
                            <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="插入" OnClientClick="javascript:return confirm('您确定要插入该记录吗? ')"
                                ValidationGroup="insert" />
                            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="清除" ValidationGroup="insert" />
                        </td>
                    </tr>
                    <tr style="color: #333333;">
                        <td style="width: 65px; height: 13px; text-align: right;">
                            制式：
                        </td>
                        <td colspan="3">
                            <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("cardtype") %>'  style="border:1px solid #09f"/>
                        </td>
                        <td style="width: 65px; height: 13px; text-align: right;">
                            品牌：
                        </td>
                        <td colspan="3">
                            <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("brand") %>'  style="border:1px solid #09f"/>
                        </td>
                    </tr>
                    <tr style="color: #333333;">
                        <td style="padding: 0px; width: 65px; height: 13px; text-align: right;">
                            运营商：
                        </td>
                        <td colspan="7" style="width: 660px; height: 13px;">
                            <asp:DropDownList ID="DropDownList_companyid_insert" runat="server" AppendDataBoundItems="False"
                                AutoPostBack="False" DataSourceID="ObjectDataSource_company" DataTextField="company"
                                DataValueField="id">
                                <asp:ListItem Selected="True" Value="0">==全部==</asp:ListItem>
                            </asp:DropDownList>
                            <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowSummary="False"
                                ValidationGroup="insert" />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="号段不能为空！"
                                ControlToValidate="TextBox1" ValidationGroup="insert"></asp:RequiredFieldValidator>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="区号不能为空！"
                                ControlToValidate="TextBox2" ValidationGroup="insert"></asp:RequiredFieldValidator>
                            <%--                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="TextBox1"></asp:RequiredFieldValidator>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="TextBox1"></asp:RequiredFieldValidator>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="TextBox1"></asp:RequiredFieldValidator>
                            --%>
                        </td>
                    </tr>
                    <tr style="background-color: #999999; color: #333333; height: 2px;">
                        <td colspan="11">
                        </td>
                    </tr>
                </InsertItemTemplate>
                <%--<SelectedItemTemplate>
                        <tr style="background-color: #E2DED6;font-weight: bold;color: #333333;">
                            <td>
                                <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="删除" />
                                <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="编辑" />
                            </td>
                            <td>
                                <asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>' />
                            </td>
                            <td>
                                <asp:Label ID="numLabel" runat="server" Text='<%# Eval("num") %>' />
                            </td>
                            <td>
                                <asp:Label ID="cityLabel" runat="server" Text='<%# Eval("city") %>' />
                            </td>
                            <td>
                                <asp:Label ID="cardtypeLabel" runat="server" Text='<%# Eval("cardtype") %>' />
                            </td>
                            <td>
                                <asp:Label ID="brandLabel" runat="server" Text='<%# Eval("brand") %>' />
                            </td>
                            <td>
                                <asp:Label ID="companyLabel" runat="server" Text='<%# Eval("company") %>' />
                            </td>
                            <td>
                                <asp:Label ID="E_companyLabel" runat="server" Text='<%# Eval("E_company") %>' />
                            </td>
                            <td>
                                <asp:CheckBox ID="Delete_flagCheckBox" runat="server" 
                                    Checked='<%# Eval("Delete_flag") %>' Enabled="false" />
                            </td>
                            <td>
                                <asp:Label ID="zoomLabel" runat="server" Text='<%# Eval("zoom") %>' />
                            </td>
                        </tr>
                    </SelectedItemTemplate>--%>
                <EmptyDataTemplate>
                    <table runat="server" style="background-color: #FFFFFF; border-collapse: collapse;
                        border-color: #999999; border-style: none; border-width: 1px;">
                        <tr>
                            <td>
                                未返回数据。
                            </td>
                        </tr>
                    </table>
                </EmptyDataTemplate>
                <EditItemTemplate>
                    <tr style="background-color: #dddddd; color: #333333; width: 100%;">
                        <td rowspan="3" style="width:40px; height: 13px; text-align: center;">
                            ID：
                        </td>
                        <td rowspan="3" style="width: 70px; height: 13px;">
                            <asp:Label ID="idLabel1" runat="server" Text='<%# Eval("id") %>' />
                        </td>
                        <td style="width: 65px; height: 13px; text-align: right;">
                            号段：
                        </td>
                        <td style="width: 90px; height: 13px;">
                            <asp:TextBox ID="numTextBox" runat="server" Text='<%# Bind("num") %>' ForeColor="Maroon"
                                Font-Bold="True" Width="80" />
                        </td>
                        <td style="width: 65px; height: 13px; text-align: right;">
                            区号：
                        </td>
                        <td style="width: 90px; height: 13px;">
                            <asp:TextBox ID="zoomTextBox" runat="server" Text='<%# Bind("zoom") %>' ForeColor="Maroon"
                                Font-Bold="True" Width="80" />
                        </td>
                        <td style="width: 65px; height: 13px; text-align: right;">
                            城市：
                        </td>
                        <td style="width: 90px; height: 13px; text-align: center;">
                            <asp:TextBox ID="cityTextBox" runat="server" Text='<%# Bind("city") %>' Width="80" />
                        </td>
                        <td style="width: 65px; height: 13px; text-align: right;">
                            禁用：
                        </td>
                        <td style="width: 90px; height: 13px;">
                            <asp:CheckBox ID="Delete_flagCheckBox" runat="server" Checked='<%# Bind("Delete_flag") %>'
                                ToolTip="选中为“使用”，不选中为“禁用”。" />
                        </td>
                        <td rowspan="3">
                            <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="更新" OnClientClick="javascript:return confirm('您确定要更新该记录吗? ')" />
                            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="取消" />
                        </td>
                    </tr>
                    <tr style="background-color: #dddddd; color: #333333;">
                        <td style="width: 65px; height: 13px; text-align: right;">
                            制式：
                        </td>
                        <td colspan="3">
                            <asp:TextBox ID="cardtypeTextBox" runat="server" Text='<%# Bind("cardtype") %>' />
                        </td>
                        <td style="width: 65px; height: 13px; text-align: right;">
                            品牌：
                        </td>
                        <td colspan="3">
                            <asp:TextBox ID="brandTextBox" runat="server" Text='<%# Bind("brand") %>' />
                        </td>
                    </tr>
                    <tr style="background-color: #dddddd; color: #333333;">
                        <td style="padding: 0px; width: 65px; height: 13px; text-align: right;">
                            运营商：
                        </td>
                        <td colspan="7" style="width: 660px; height: 13px;">
                            <asp:DropDownList ID="DropDownList_companyid_Edit" runat="server" AppendDataBoundItems="False"
                                AutoPostBack="False" DataSourceID="ObjectDataSource_company" DataTextField="company"
                                SelectedValue='<%# Bind("companyid") %>' DataValueField="id">
                                <asp:ListItem Selected="True" Value="0">==全部==</asp:ListItem>
                            </asp:DropDownList>
                            <%--（ <asp:TextBox ID="E_companyTextBox" runat="server" Text='<%# Bind("E_company") %>'  />
                                 ）--%>
                        </td>
                    </tr>
                    <tr style="background-color: #dddddd; color: #333333; height: 4px;">
                        <td colspan="11">
                        </td>
                    </tr>
                </EditItemTemplate>
                <ItemTemplate>
                    <tr style="color: #333333; width: 100%;">
                        <td rowspan="3" style="width: 40px; height: 13px; text-align: center;">
                            ID：
                        </td>
                        <td rowspan="3" style="width: 70px; height: 13px;">
                            <asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>' />
                        </td>
                        <td style="width: 65px; height: 13px; text-align: right;">
                            号段：
                        </td>
                        <td style="width: 90px; height: 13px;">
                            <asp:Label ID="numLabel" runat="server" Text='<%# Eval("num") %>' ForeColor="Maroon"
                                Font-Bold="True" />
                        </td>
                        <td style="width: 65px; height: 13px; text-align: right;">
                            区号：
                        </td>
                        <td style="width: 90px; height: 13px;">
                            <asp:Label ID="zoomLabel" runat="server" Text='<%# Eval("zoom") %>' ForeColor="Maroon"
                                Font-Bold="True" />
                        </td>
                        <td style="width: 65px; height: 13px; text-align: right;">
                            城市：
                        </td>
                        <td style="width: 90px; height: 13px;">
                            <asp:Label ID="cityLabel" runat="server" Text='<%# Eval("city") %>' />
                        </td>
                        <td style="width: 65px; height: 13px; text-align: right;">
                            禁用：
                        </td>
                        <td style="width: 90px; height: 13px;">
                            <asp:CheckBox ID="Delete_flagCheckBox" runat="server" Checked='<%# Eval("Delete_flag") %>'
                                Enabled="false" ToolTip="选中为“使用”，不选中为“禁用”。" />
                        </td>
                        <td rowspan="3">
                            <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="编辑" />
                            <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="删除" OnClientClick="javascript:return confirm('您确定要删除该记录吗? 您将无法恢复！')" />
                        </td>
                    </tr>
                    <tr style=" color: #333333;"> 
                        <td style="width: 65px; height: 13px; text-align: right;">
                            制式：
                        </td>
                        <td colspan="3">
                            <asp:Label ID="cardtypeLabel" runat="server" Text='<%# Eval("cardtype") %>' />
                        </td>
                        <td style="width: 65px; height: 13px; text-align: right;">
                            品牌：
                        </td>
                        <td colspan="3">
                            <asp:Label ID="brandLabel" runat="server" Text='<%# Eval("brand") %>' />
                        </td>
                    </tr>
                    <tr style="color: #333333;">
                        <td style="width: 65px; height: 13px; text-align: right;">
                            运营商：
                        </td>
                        <td colspan="7" style="width: 660px; height: 13px;">
                            <asp:Label ID="companyLabel" runat="server" Text='<%# Eval("company") %>' />
                            （<asp:Label ID="E_companyLabel" runat="server" Text='<%# Eval("E_company") %>' />
                            ）
                        </td>
                    </tr>
                    <tr style="background:#dddddd;color: #333333; height: 2px;">
                        <td colspan="11">
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:ListView>
            <font color="red">*注：电话数据量很大，默认情况下，只显示最后200条数据，通过选择过滤条件，可以显示更多数据。</font>
            <asp:ObjectDataSource ID="ObjectDataSource_MPnumber" runat="server" DeleteMethod="Delete"
                InsertMethod="Insert_New_Data_Query" OldValuesParameterFormatString="original_{0}"
                SelectMethod="Get_Data_Order_By_id_For_Admin" TypeName="DataSet_fp_DyhTableAdapters.Dyh_MPcodeTableAdapter"
                UpdateMethod="Update_Data_Query">
                <DeleteParameters>
                    <asp:Parameter Name="Original_id" Type="Int32" />
                </DeleteParameters>
                <UpdateParameters>
                    <asp:Parameter Name="num" Type="String" />
                    <asp:Parameter Name="city" Type="String" />
                    <asp:Parameter Name="cardtype" Type="String" />
                    <asp:Parameter Name="brand" Type="String" />
                    <asp:Parameter Name="companyid" Type="Byte" />
                    <asp:Parameter Name="Delete_flag" Type="Boolean" />
                    <asp:Parameter Name="zoom" Type="String" />
                    <asp:Parameter Name="mode" Type="String" />
                    <asp:Parameter Name="Original_id" Type="Int32" />
                </UpdateParameters>
                <SelectParameters>
                    <asp:ControlParameter ControlID="HiddenField_top" Name="top" PropertyName="Value"
                        Type="Int32" />
                    <asp:ControlParameter ControlID="HiddenField_company" Name="companyid" PropertyName="Value"
                        Type="Byte" />
                    <asp:ControlParameter ControlID="TextBox_search" Name="num" PropertyName="Text" Type="String" />
                    <asp:ControlParameter ControlID="TextBox_city" Name="city" PropertyName="Text" Type="String" />
                </SelectParameters>
                <InsertParameters>
                    <asp:Parameter Name="num" Type="String" />
                    <asp:Parameter Name="city" Type="String" />
                    <asp:Parameter Name="cardtype" Type="String" />
                    <asp:Parameter Name="brand" Type="String" />
                    <asp:Parameter Name="Delete_flag" Type="Boolean" />
                    <asp:Parameter Name="zoom" Type="String" />
                    <asp:Parameter Name="companyid" Type="Byte" />
                    <asp:Parameter Name="mode" Type="String" />
                </InsertParameters>
            </asp:ObjectDataSource>
            <asp:HiddenField ID="HiddenField_top" runat="server" Value="200" />
            <asp:HiddenField ID="HiddenField_company" runat="server" Value="0" />
            <asp:HiddenField ID="HiddenField_firstnum" runat="server" Value="0" />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
